import service from '@/utils/request'

// @Tags Disease
// @Summary 创建病症
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Disease true "创建病症"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /disease/createDisease [post]
export const createDisease = (data) => {
  return service({
    url: '/disease/createDisease',
    method: 'post',
    data
  })
}

// @Tags Disease
// @Summary 删除病症
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Disease true "删除病症"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /disease/deleteDisease [delete]
export const deleteDisease = (params) => {
  return service({
    url: '/disease/deleteDisease',
    method: 'delete',
    params
  })
}

// @Tags Disease
// @Summary 批量删除病症
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除病症"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /disease/deleteDiseaseByIds [delete]
export const deleteDiseaseByIds = (params) => {
  return service({
    url: '/disease/deleteDiseaseByIds',
    method: 'delete',
    params
  })
}

// @Tags Disease
// @Summary 更新病症
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Disease true "更新病症"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /disease/updateDisease [put]
export const updateDisease = (data) => {
  return service({
    url: '/disease/updateDisease',
    method: 'put',
    data
  })
}

// @Tags Disease
// @Summary 用id查询病症
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Disease true "用id查询病症"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /disease/findDisease [get]
export const findDisease = (params) => {
  return service({
    url: '/disease/findDisease',
    method: 'get',
    params
  })
}

// @Tags Disease
// @Summary 分页获取病症列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "分页获取病症列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /disease/getDiseaseList [get]
export const getDiseaseList = (params) => {
  return service({
    url: '/disease/getDiseaseList',
    method: 'get',
    params
  })
}

// @Tags Disease
// @Summary 设置病症文章
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.DiseaseArticleReq true "设置病症文章"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
// @Router /disease/setDiseaseArticle [post]
export const setDiseaseArticle = (data) => {
  return service({
    url: '/disease/setDiseaseArticle',
    method: 'post',
    data
  })
}

// @Tags Disease
// @Summary 获取病症文章
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.DiseaseArticleReq true "获取病症文章"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /disease/getDiseaseArticle [get]
export const getDiseaseArticle = (params) => {
  return service({
    url: '/disease/getDiseaseArticle',
    method: 'get',
    params
  })
}
